<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加工厂信息</title>
<body class="withvernav">
    <div class="bodywrapper">
        {{include file='/public/leftmenu.tpl'}}
        <div class="centercontent">

            <div class="pageheader">
                <h1 class="pagetitle">添加工厂信息</h1>

            </div><!--pageheader-->

            <div id="contentwrapper" class="contentwrapper">

                <div id="basicform" class="subcontent">

                    <!--contenttitle-->

                    <form id="form" class="stdform stdform2" method="post" action="/management/addFactory">
                        <p>
                            <label>名称：</label>
                            <span class="field"><input type="text" name="name" class="_check longinput" value="" /></span>
                        </p>
                        <p class="stdformbutton">
                            <button id="btn" type="button" class="submit radius2">Submit Button</button>
                        </p>
                    </form>

                    <br />

                </div><!--subcontent-->

                <!--subcontent-->

            </div><!--contentwrapper-->

        </div><!-- centercontent -->


    </div><!--bodywrapper-->

    <script type="text/javascript">

        $('#btn').on('click', function () {

            $('._check').each(function (index, element) {

                if ($(this).val() == '') {

                    s = $(this).parent().siblings('label').html();

                    $(this).after('<br /><span style="color:#ff0000;">请输入' + s.replace(/：/, '') + '</span>');
                    $(this).focus();
                    exit;
                }
            });
            $('#form').submit();
        });

    </script>

</body>
</html>
